<!DOCTYPE html>
<html lang="en">

<head>
    <#include "/lx/admin/components/meta.html" />
    <title>活动管理 ${metaTitleSuffix!}</title>
    <#include "/lx/admin/components/stylesheets.html" />
</head>

<body>
    <div id="app">
        <el-container>
            <#assign menuIndex="1-1" />
            <#include "/lx/admin/components/menu.html" />
            <el-container>
                <#include "/lx/admin/components/header.html" />
                <el-main>
                    <template>
                        <el-row>
                            <el-col :span="12">
                                <div class="title theme-color1">活动管理</div>
                            </el-col>
                            <el-col :span="12">
                                <el-input placeholder="请输入内容" v-model="word" class="input-with-select">
                                    <el-select v-model="type" slot="prepend" placeholder="请选择" style='width: 100px;'>
                                        <el-option label="艺术" :value="0"></el-option>
                                        <el-option label="教育" :value="1"></el-option>
                                        <el-option label="法律" :value="2"></el-option>
                                        <el-option label="心理学" :value="3"></el-option>
                                        <el-option label="商业" :value="4"></el-option>
                                        <el-option label="医学" :value="5"></el-option>
                                        <el-option label="计算机" :value="6"></el-option>
                                        <el-option label="工程" :value="7"></el-option>
                                        <el-option label="生命科学" :value="8"></el-option>
                                        <el-option label="自然科学" :value="9"></el-option>
                                        <el-option label="社会科学" :value="10"></el-option>
                                    </el-select>
                                    <el-button slot="append" icon="el-icon-search" @click='onSearch'></el-button>
                                </el-input>
                            </el-col>
                        </el-row>
                        <el-table ref="multipleTable" :data="list" tooltip-effect="dark" :stripe='true' style="width: 100%">
                            <el-table-column prop="department" label="学院" sortable width=300>
                            </el-table-column>
                            <el-table-column prop="name" label="名称" sortable width=200>
                            </el-table-column>
                            <el-table-column prop="uk" label="中国大学" sortable width=150>
                            </el-table-column>
                            <el-table-column prop="cn" label="英国大学" sortable width=150>
                            </el-table-column>
                            <el-table-column prop="rank" label="排名" sortable show-overflow-tooltip>
                            </el-table-column>
                            <el-table-column prop="minRank" label="最低排名" sortable show-overflow-tooltip>
                            </el-table-column>
                            <el-table-column prop="maxRank" label="最高排名" sortable show-overflow-tooltip>
                            </el-table-column>
                            <el-table-column prop="score" label="score" sortable show-overflow-tooltip>
                            </el-table-column>
                            <el-table-column prop="extra" label="extra" sortable show-overflow-tooltip>
                            </el-table-column>
                            <!-- <el-table-column prop="type" label="线上/线下" sortable>
                                <template slot-scope="scope">
                                    <span v-if="scope.row.type == 1">线下</span>
                                    <span v-if="scope.row.type == 2">线上</span>
                                </template>
                            </el-table-column> -->
                            <!-- <el-table-column fixed="right" label="操作" width="230">
                            </el-table-column> -->
                        </el-table>
                        <#include "/lx/admin/components/page.html" />
                    </template>
                </el-main>
            </el-container>
        </el-container>
        <#include "/lx/admin/components/footer.html" />
    </div>
    <#include "/lx/admin/components/scripts.html" />
    <script>
        var vue = new Vue({
        el: '#app',
        data() {
            return {
                word: '${word!""}',
                type: Number('${type!"0"}'),
                list: JSON.parse(`${items!'[]'}`)
            }
        },
        mounted: function() {
        },
        methods: {
            onSearch(){
                window.location.href = "/lx/search/debug?wd="+this.word+'&type='+this.type;
            },
            add() {
                window.location.href = "/lx/admin/activity/info";
            },
            enrollList(item) {
                window.location.href = "/lx/admin/activity/enrollList?activityId=" + item.id;
            },
            feedbackList(item) {
                window.location.href = "/lx/admin/activity/feedbackList?activityId=" + item.id;
            },
            edit(item) {
                window.location.href = "/lx/admin/activity/info?activityId=" + item.id;
            },
            del(item) { 
            },
            onPageChange(val) {
                // console.log('当前页: {val}' + val);
                goPage(val)
            }
        }
    })
    </script>
    <script>
    </script>
    <#include "/lx/admin/components/msg.html" />
    <style type="text/css">
    .title {
        font-size: 18px;
        font-weight: bold;
    }

    .operations {
        text-align: right;
    }
    </style>
</body>

</html>